package com.heh.mybatisplus.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heh.mybatisplus.mapper.BidInfoMapper;
import com.heh.mybatisplus.model.BidInfo;
import com.heh.mybatisplus.service.BidInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BidInfoServiceImpl extends ServiceImpl<BidInfoMapper, BidInfo> implements BidInfoService {
    @Autowired
    private BidInfoMapper userMapper;

    @Override
    public IPage<BidInfo> getUsersByPage(int pageNumber, int pageSize) {
        // 创建分页对象
        Page<BidInfo> page = new Page<>(pageNumber, pageSize);

        // 执行分页查询
        return userMapper.selectPage(page, null); // 无查询条件时传 null
    }
}
